From: chris@kneesaa.uk.xensource.com Date: Wed, 26 Jul 2006 13:26:03 +0000 (+0100) Subject: [qemu] Use domain-name in VNC window title. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15786^2~10^2~3 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=e9f8582d3ad8154097f68c5566cbf678e53cb44e;p=xen.git [qemu] Use domain-name in VNC window title. Set the VNC window title with domain-name. Signed-off-by: Yang Xiaowei Signed-off-by: Christian Limpach --- diff --git a/tools/ioemu/patches/series b/tools/ioemu/patches/series index 5fc4d15c7f..3ee8646550 100644 --- a/tools/ioemu/patches/series +++ b/tools/ioemu/patches/series @@ -32,3 +32,4 @@ acpi-poweroff-support vnc-cleanup vnc-fixes vnc-start-vncviewer +vnc-title-domain-name diff --git a/tools/ioemu/patches/vnc-title-domain-name b/tools/ioemu/patches/vnc-title-domain-name new file mode 100644 index 0000000000..3fb1491bab --- /dev/null +++ b/tools/ioemu/patches/vnc-title-domain-name @@ -0,0 +1,25 @@ +Index: ioemu/vnc.c +=================================================================== +--- ioemu.orig/vnc.c 2006-07-26 14:23:52.426074956 +0100 ++++ ioemu/vnc.c 2006-07-26 14:24:15.210558295 +0100 +@@ -850,6 +850,7 @@ + + static int protocol_client_init(VncState *vs, char *data, size_t len) + { ++ size_t l; + char pad[3] = { 0, 0, 0 }; + + vs->width = vs->ds->width; +@@ -886,8 +887,10 @@ + + vnc_write(vs, pad, 3); /* padding */ + +- vnc_write_u32(vs, 4); +- vnc_write(vs, "QEMU", 4); ++ l = strlen(domain_name); ++ vnc_write_u32(vs, l); ++ vnc_write(vs, domain_name, l); ++ + vnc_flush(vs); + + vnc_read_when(vs, protocol_client_msg, 1); diff --git a/tools/ioemu/vnc.c b/tools/ioemu/vnc.c index 0450f4bcb8..b2d539ec93 100644 --- a/tools/ioemu/vnc.c +++ b/tools/ioemu/vnc.c @@ -850,6 +850,7 @@ static int protocol_client_msg(VncState *vs, char *data, size_t len) static int protocol_client_init(VncState *vs, char *data, size_t len) { + size_t l; char pad[3] = { 0, 0, 0 }; vs->width = vs->ds->width; @@ -886,8 +887,10 @@ static int protocol_client_init(VncState *vs, char *data, size_t len) vnc_write(vs, pad, 3); /* padding */ - vnc_write_u32(vs, 4); - vnc_write(vs, "QEMU", 4); + l = strlen(domain_name); + vnc_write_u32(vs, l); + vnc_write(vs, domain_name, l); + vnc_flush(vs); vnc_read_when(vs, protocol_client_msg, 1);